<template>
  <div>
    <Slection />
    <VideoCard :videoData="videoList"/>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Topic",
});
</script>


<script setup lang="ts">
import { onMounted } from 'vue';
import Slection from '../components/Slection/index.vue';
import VideoCard from '@/components/VideoCard/index.vue';
import { storeToRefs } from 'pinia';
import { useResourceStore } from '@/store/resource';
import { ElLoading, ElMessage } from 'element-plus';

const resourceStore = useResourceStore();
const { videoList } = storeToRefs(resourceStore);
const { getIntegrated } = resourceStore;

// 初始化请求 综合榜
onMounted(async () => {
  try {
    ElLoading.service({ fullscreen: true });
    await getIntegrated(3, 8);
    ElLoading.service({ fullscreen: true }).close()
  } catch (error:any) {
    ElMessage.error(error)
  }
});
</script>

<style scoped lang="less"></style>
